import { setStore, getStore } from '@/utils/store'
const articleContent = {
	state:{
		detailLevel:getStore({name:'articleBreadcrumb'}) || [],
	},
	mutations:{
		SET_LEVEL: (state,breadcrumb) => {
			console.log("------面包屑--------")
		
	      	state.detailLevel[breadcrumb.level] = breadcrumb.data;
	      	//保存至storage,解决刷新获取不到面包屑
	      	setStore({name:'articleBreadcrumb',content:state.detailLevel,type:'session'})
	    },
	},
	actions:{
		setLevel({ commit },breadcrumb){
			
			
			commit('SET_LEVEL',breadcrumb)
		}
	}
}

export default articleContent